import baseRequest from "@/common/js/request.js"

 function getPublicFormList (data) {
	return baseRequest('/form/definition/public', data)
}

 function getFormList () {
	return baseRequest('/form/definition/formDefineList')
}

 function getFormInfo (id) {
	return baseRequest('/form/definition/' + id)
}

// 新增自定义单保存的单主值
 function addLogmaster(data) {
	return baseRequest('/form/logmaster', data, 'POST', 'application/json;charset=UTF-8')
  }
  
  // 修改自定义单保存的单主值
 function updateLogmaster(data) {
	return baseRequest('/form/logmaster', data, 'PUT')
  }
  
  // 删除自定义单保存的单主值
 function delLogmaster(id) {
	return baseRequest('/form/logmaster/' + id, {}, 'DELETE')
  }

 function getLogmasterInfo(id) {
	return baseRequest('/form/logmaster/' + id)
  }
  
 function getMyFormHistoryList(data) {
	return baseRequest('/form/logmaster/my/list', data)
  }
  
  function getDeptFormHistoryList(data) {
	return baseRequest('/form/logmaster/list', data)
  }

  export{
		getFormList,
		getPublicFormList,
		getFormInfo,
		addLogmaster,
		updateLogmaster,
		delLogmaster,
		getLogmasterInfo,
		getMyFormHistoryList,
		getDeptFormHistoryList
  }